package com.rambo.dsd.sys.dao.inter.po;

import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;

/**
 * Create by Rambo on 2017/6/21
 **/
@Entity(name = "role")
public class RolePO {
    private String uuid;
    private String cname;
    private String type;
    private String yxbz;
    private String sorts;

    @Id
    @Column(name = "UUID")
    public String getUuid() {
        return uuid;
    }

    public void setUuid(String uuid) {
        this.uuid = uuid;
    }

    @Basic
    @Column(name = "CNAME")
    public String getCname() {
        return cname;
    }

    public void setCname(String cname) {
        this.cname = cname;
    }

    @Basic
    @Column(name = "TYPE")
    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    @Basic
    @Column(name = "YXBZ")
    public String getYxbz() {
        return yxbz;
    }

    public void setYxbz(String yxbz) {
        this.yxbz = yxbz;
    }

    @Basic
    @Column(name = "SORTS")
    public String getSorts() {
        return sorts;
    }

    public void setSorts(String sorts) {
        this.sorts = sorts;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o)
            return true;
        if (o == null || getClass() != o.getClass())
            return false;

        RolePO rolePO = (RolePO) o;

        if (uuid != null ? !uuid.equals(rolePO.uuid) : rolePO.uuid != null)
            return false;
        if (cname != null ? !cname.equals(rolePO.cname) : rolePO.cname != null)
            return false;
        if (type != null ? !type.equals(rolePO.type) : rolePO.type != null)
            return false;
        if (yxbz != null ? !yxbz.equals(rolePO.yxbz) : rolePO.yxbz != null)
            return false;
        if (sorts != null ? !sorts.equals(rolePO.sorts) : rolePO.sorts != null)
            return false;

        return true;
    }

    @Override
    public int hashCode() {
        int result = uuid != null ? uuid.hashCode() : 0;
        result = 31 * result + (cname != null ? cname.hashCode() : 0);
        result = 31 * result + (type != null ? type.hashCode() : 0);
        result = 31 * result + (yxbz != null ? yxbz.hashCode() : 0);
        result = 31 * result + (sorts != null ? sorts.hashCode() : 0);
        return result;
    }
}